<template>
  <section class="cta-section">
    <div class="container">
      <div class="cta-content">
        <h2>开始您的AI剧场之旅</h2>
        <p>立即注册，体验智能化的角色扮演学习</p>

        <div class="cta-actions">
          <button class="btn btn-primary" @click="handleGetStarted">
            <i class="icon-rocket"></i>
            免费开始
          </button>

          <button class="btn btn-outline" @click="$router.push('/about')">
            <i class="icon-info"></i>
            了解更多
          </button>
        </div>

        <!-- 信任标识 -->
        <div class="trust-indicators">
          <div class="trust-item">
            <i class="icon-shield"></i>
            <span>数据安全</span>
          </div>
          <div class="trust-item">
            <i class="icon-clock"></i>
            <span>7x24服务</span>
          </div>
          <div class="trust-item">
            <i class="icon-award"></i>
            <span>专业认证</span>
          </div>
        </div>
      </div>
    </div>
  </section>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'

const router = useRouter()
const handleGetStarted = () => {
  router.push('/auth/register')
}
</script>

<style scoped>
.cta-section {
  padding: 5rem 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
  background-color: #f8fafc;
  color: #1f2937;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 20px 20px, rgba(59, 130, 246, 0.08) 1px, transparent 0),
    radial-gradient(circle at 60px 60px, rgba(6, 182, 212, 0.06) 1px, transparent 0);
  background-size: 80px 80px;
  pointer-events: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.cta-content {
  max-width: 650px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.cta-content h2 {
  font-size: 2.75rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: #1f2937;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.cta-content p {
  font-size: 1.2rem;
  color: #6b7280;
  margin-bottom: 2.5rem;
  line-height: 1.6;
  font-weight: 400;
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

/* 按钮基础样式 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.25rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.75rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  outline: none;
  min-width: 150px;
  justify-content: center;
  position: relative;
}

/* 主要按钮样式 - 浅蓝色主题 */
.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  color: white;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb, #0891b2);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.25);
}

/* 轮廓按钮样式 - 浅蓝色主题 */
.btn-outline {
  background: rgba(255, 255, 255, 0.8);
  color: #3b82f6;
  border: 2px solid rgba(59, 130, 246, 0.2);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.08);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: #3b82f6;
  color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.btn-outline:active {
  transform: translateY(0);
}

.trust-indicators {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  border: 1px solid rgba(59, 130, 246, 0.08);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.08);
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: #4b5563;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
}

.trust-item i {
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
  opacity: 0.8;
}

/* 图标样式 */
.icon-rocket::before {
  content: '🚀';
}

.icon-info::before {
  content: 'ℹ️';
}

.icon-shield::before {
  content: '🛡️';
}

.icon-clock::before {
  content: '⏰';
}

.icon-award::before {
  content: '🏆';
}

/* 响应式设计 */
@media (max-width: 768px) {
  .cta-section {
    padding: 4rem 0;
  }

  .cta-content h2 {
    font-size: 2.25rem;
  }

  .cta-content p {
    font-size: 1.1rem;
  }

  .trust-indicators {
    flex-wrap: wrap;
    gap: 2rem;
    padding: 1.5rem;
  }

  .btn {
    padding: 0.875rem 2rem;
    font-size: 0.95rem;
    min-width: 140px;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 1rem;
  }

  .cta-content h2 {
    font-size: 2rem;
  }

  .cta-content p {
    font-size: 1rem;
  }

  .cta-actions {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .trust-indicators {
    flex-direction: column;
    gap: 1.5rem;
  }

  .btn {
    width: 100%;
    max-width: 280px;
  }

  .trust-item {
    flex-direction: row;
    justify-content: center;
  }
}
</style>
